﻿using Abp.Application.Services;
using FwProject.PrePaymentInfo.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.PrePaymentInfo
{
    /// <summary>
    /// 预收款管理
    /// </summary>
    public interface IPrePaymentInfoAppService : IApplicationService
    {
        Task<IPagedList<PrePaymentInfoOutputDto>> GetPagedListAsync(int pageIdx, int pageSize, PrePaymentInfoType type, string keyword, PrePaymentInfoStatus? PrePaymentInfoStatus);

        Task<List<PrePaymentInfoOutputDto>> GetAllListAsync(PrePaymentInfoType type, string keyword);

        Task<PrePaymentInfoEnterDto> GetEnterDto(Guid id);

        Task<List<PrePaymentInfoEnterDto>> GetListByRestaurantIdAsync(Guid restaurantId);

        Task<PrePaymentPrintDto> GetPrePaymentPrintModelAsync(Guid id);

        Task<PrePaymentInfoOutputDto> GetEntityAsync(Guid id);

        Task<Guid> CreateAsync(PrePaymentInfoEnterDto input);

        Task ModifyAsync(Guid id, PrePaymentInfoEnterDto input);

        Task DeleteAsync(Guid id);

        Task<decimal> GetPaymentOverAsync(Guid id);


        Task<IPagedList<AdvanceOverageOutputDto>> GetAdvanceOveragePagedListAsync(int pageIdx, int pageSize, bool isnull, string keyword);

        /// <summary>
        /// App根据餐厅Id返回预收款金额
        /// </summary>
        /// <param name="RestaurantId"></param>
        /// <returns></returns>
        Task<decimal> GetRestaurantInfoNamePrePayment(Guid RestaurantId);

        Task<decimal> GetRestaurantInfoByReceiptInfoIdPayment(Guid RestaurantId, Guid receiptInfoId);
    }
}
